<script type="text/javascript">
    function showFields(valor){
        if (valor == 2) {
            document.getElementById('divout').style.display='block';
        }else{
            document.getElementById('divout').style.display='none';
        }
    }
</script>
<div class="placements form">
<?php echo $this->Form->create('Placement');?>
	<fieldset>
		<legend><?php __('Add Placement'); ?></legend>
	<?php
		echo $this->Form->input('charters_id',array('onChange'=>'showFields(this.value)'));?>
         <div id="divout" style="display:none"><?php echo $this->Form->input('provinces_id',array('label'=>'Provincia'));?></div> 
        <?php   echo $this->Form->input('descripcion');
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('List Placements', true), array('action' => 'index'));?></li>
		<li><?php echo $this->Html->link(__('List Jurisdictions', true), array('controller' => 'jurisdictions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Jurisdictions', true), array('controller' => 'jurisdictions', 'action' => 'add')); ?> </li>
	</ul>
</div>